Wildcards
Enables to query multiple tables at once using concise SQL statements.
Them are just representation of union of all the tables matching a particular wildcard espression.
Can be used for tables with:
- similar schema
- same prefix
Practical example
If having a dataset containing tables with the same schema for every year. say:
weather2000, weather2001, ... , weather2021
you can use
SELECT ...
FROM `dataset.weather200`
to get the union from years 2000 to 2009
Filtering by suffix
SELECT ...
FROM <wildcard>
WHERE _TABLE_SUFFIX = <wanted suffix>
Limitations
- Supports Big Query storage only.
Are not allowed:.
- External tables
- Views, even if in a list of tables
- Chached results are not supported. Every query will be billed
- Can't be used in Insert/delete/update statements. But it is possible to use wildcards in the
WHERE